package com.castile.parking.resource.controller;

import com.castile.parking.resource.entity.Stall;
import com.castile.parking.resource.service.IStallService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: Castile
 * @create: 2024-04-20 17:45
 * @Version 1.0
 **/
@RestController
@RequestMapping("/stall")
@Slf4j
@Api(value = "车位控制器服务", tags = "车位控制器服务相关接口")
public class StallController {

    @Autowired
    private IStallService stallService;

    @PostMapping("/list")
    @ApiOperation(value = "列出所有的车位", notes = "返回当前的车位集合")
    public List<Stall> list() {
        List<Stall> members = stallService.list();
        log.debug("query stall list=" + members);
        return members;
    }


}
